//
//  ZLRiliCell.m
//  rili
//
//  Created by 张超 on 2017/9/26.
//  Copyright © 2017年 张超. All rights reserved.
//

#import "ZLRiliCell.h"

@implementation ZLRiliCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (IBAction)btnClick:(UIButton *)sender {
    
    [self endEditing:YES];

    if (self.cellBlock) {
        self.cellBlock(sender);
    }
}

- (IBAction)textClick:(UITextField *)sender {
    
    if (self.cellEndBlock) {
        self.cellEndBlock(sender);
    }
}

- (void)setRilis:(rilisModel *)rilis {
    
    _rilis = rilis;
    
    [self.btnCell setTitle:rilis.title forState:UIControlStateNormal];
    
    if (rilis.timer.length > 0) {
        
        self.timerCell.text = rilis.timer;
    } else {
        self.timerCell.text = @"";
    }
    
}

@end
